package com.vm.util;

import java.io.File;
import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;

public class ZipUtils {
	public static boolean  ZipFile(File file) 
	 {
	   Boolean isZip = true;
	   try{
		   java.util.zip.ZipFile zf = new java.util.zip.ZipFile(file);
		   Enumeration e = zf.entries();
		   while(e.hasMoreElements())
		   {
		    ZipEntry ze = (ZipEntry) e.nextElement();
		    if(!ze.isDirectory())
		     new String(ze.getName().getBytes("ISO-8859-1"), "GB2312");
		   }
		 }catch(ZipException e){
			 e.printStackTrace();
			 isZip = false;
			 
		 } catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		 return isZip;
	   }


}
